package cn.service;

import cn.dao.UploadDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartHttpServletRequest;

/**
 * Created by wsx on 2017/1/16.
 */
@Service
public class UploadService {
    @Autowired
    private UploadDao uploaddao;

    public String addfile(String sourcename,String fnewname,MultipartHttpServletRequest mreq){
        String fdesc = mreq.getParameter("fdesc");
        if(uploaddao.addfile(sourcename,fnewname,fdesc)) {
            return "true";
        }else{
            return "false";
        }
    }

}
